import request from '@/utils/request'

//列表
export function listcoupon(query) {
  return request({
    url: '/system/coupon/list',
    method: 'get',
    params: query
  })
}


//列表
export function getZyCouponEffectiveList(query) {
  return request({
    url: '/system/coupon/getZyCouponEffectiveList',
    method: 'get',
    params: query
  })
}

export function listtype(query) {
  return request({
    url: '/system/type/list',
    method: 'get',
    params: query
  })
}
// export function listitem(query) {
//   return request({
//     url: '/system/item/store/list',
//     method: 'get',
//     params: query
//   })
// }
export function listitem(query) {
  return request({
    url: '/system/item/store/getItemList',
    method: 'get',
    params: query
  })
}
//详情
export function getcoupon(id) {
  return request({
    url: '/system/coupon/' + id,
    method: 'get'
  })
}

//新增
export function addcoupon(data) {
  return request({
    url: '/system/coupon',
    method: 'post',
    data: data
  })
}
//修改
export function updatecoupon(data) {
  return request({
    url: '/system/coupon',
    method: 'put',
    data: data
  })
}
//修改
export function updatecouponsssss(data) {
  return request({
    url: '/system/coupon/updateStatus',
    method: 'put',
    data: data
  })
}
//删除
export function delitecoupon(id) {
  return request({
    url: '/system/coupon/' + id,
    method: 'delete'
  })
}


export function listMemberRegion(query) {
  return request({
    url: '/system/region/addList',
    method: 'get',
    params: query
  })
}
export function listMemberStore(query) {
  return request({
    url: '/system/store/pullDown',
    method: 'get',
    params: query
  })
}
export function listpullDownlist(query) {
  return request({
    url: '/system/item/type/pullDown/list',
    method: 'get',
    params: query
  })
}
export function liststorelist(query) {
  return request({
    url: '/system/item/store/appList',
    method: 'get',
    params: query
  })
}
//使用时间
export function listslot(query) {
  return request({
    url: '/system/slot/list',
    method: 'get',
    params: query
  })
}

//储值卡消费记录
export function cardDetailList(query) {
  return request({
    url: '/system/value/card/detail/cardDetailList',
    method: 'get',
    params: query
  })
}

export function giveList(query) {
  return request({
    url: '/system/give/list',
    method: 'get',
    params: query
  })
}
